package org.lc.stk.service.user;

import org.lc.stk.model.user.User;
import org.lc.stk.web.dto.user.BulkOperationRequest;
import org.lc.stk.web.dto.user.UserAdminCreateRequest;
import org.lc.stk.web.dto.user.UserQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Set;

public interface UserService {
    
    // 基础查询方法
    User findByUsername(String username);
    boolean existsByUsername(String username);

    // 用户管理方法
    User createUser(UserAdminCreateRequest request);
    User updateUser(Integer id, UserAdminCreateRequest request);
    void deleteUser(Integer id);
    User getUser(Integer id);
    Page<User> searchUsers(UserQuery query, Pageable pageable);
    
    // 批量操作方法
    void bulkOperation(BulkOperationRequest request);
    void assignRoles(Set<Integer> userIds, Set<Integer> roleIds);
    void deleteUsers(Set<Integer> userIds);
}